package com.s7_compat.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.Button;

import com.s7.compat.CompatActivity;
import com.s7.compat.status.utils.StatusBarUtils;

import com.s7_compat.R;
import com.s7_compat.mvp.PMActivity;
import com.s7_compat.service.HintService;

public class MainActivity extends CompatActivity implements View.OnClickListener {

    private Button btn1, btn2, btn3;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_main);

        StatusBarUtils.getInstance(this).setStatusBar(0xFFCCFFFF);

        btn1 = findViewById(R.id.btn_1);
        btn2 = findViewById(R.id.btn_2);
        btn3 = findViewById(R.id.btn_3);


        /**
         * 启动服务
         */
        stopService(new Intent(this,HintService.class));

        btn1.setOnClickListener(this);
        btn2.setOnClickListener(this);
        btn3.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_1:
                startActivity(PMActivity.class);
                break;
            case R.id.btn_2:
                startActivity(HttpActivity.class);
                break;
            case R.id.btn_3:
                startActivity(ServiceActivity.class);
                break;
        }
    }
}

